package com.example.yk.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.yk.R
import com.example.yk.entity.MallGoodsInfoPageResponse

class GoodsAdapter(list: MutableList<MallGoodsInfoPageResponse>):BaseQuickAdapter<MallGoodsInfoPageResponse,BaseViewHolder>(
    R.layout.item_goods,list) {
    override fun convert(holder: BaseViewHolder, item: MallGoodsInfoPageResponse) {
        holder.setText(R.id.goods_tv,item.title)
        Glide.with(context).load(item.mainImgUrl).into(holder.getView(R.id.goods_iv))
    }
}